import QtQuick 2.6

import "../../Base/UiBase"
import "../../Base/Config"

Rectangle {
    id: root
    color: Color.foreground

    property bool isAdvView: false

    Component.onCompleted: {
        // generate a isAdvViewChanged signal
        isAdvView = !isAdvView
    }

    ImageButton {
        id: filterButton

        property bool activated: false

        onClicked: activated = !activated

        anchors {
            verticalCenter: parent.verticalCenter
            left: parent.left
        }

        width: 137 * Size.ratio
        height: 50 * Size.ratio
        source: activated ? "../../../resources/tcommunity/filterBar/shaixuan02.svg" : "../../../resources/tcommunity/filterBar/shaixuan01.svg"
    }

    ImageButton {
        id: viewTypeButton
        onClicked: root.isAdvView = !root.isAdvView

        anchors {
            verticalCenter: parent.verticalCenter
            right: parent.right
        }
        width: 78 * Size.ratio
        height: 50 * Size.ratio
        source: root.isAdvView ? "../../../resources/tcommunity/filterBar/shu01.svg" : "../../../resources/tcommunity/filterBar/heng01.svg"
    }
}
